#include "EGCore.h"
#include "GEngine/GCore.h"

DLLEXPORT void __stdcall InitD3D(HWND hWnd, double width, double height)
{
	GCore::GetCore().Initialize(hWnd, width, height);
}


DLLEXPORT int __stdcall RenderFrame(void)
{
	GCore::GetCore().Run();
	return 0;
}

DLLEXPORT void __stdcall MsgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
	
	 GCore::GetCore().MsgProc(hwnd,msg,wParam,lParam);
}

DLLEXPORT void __stdcall SaveScene()
{
	GCore::GetCore().SaveScene();
}
DLLEXPORT int __stdcall GetSceneObjectNum(void)
{
	return GCore::GetCore().GetSceneObjectNum();
}

DLLEXPORT const char* __stdcall GetSceneObjectName(int index)
{
	return GCore::GetCore().GetSceneObjectName(index);
}

DLLEXPORT void __stdcall SelectSceneObject(char* sceneObjectName)
{
	 GCore::GetCore().SelectSceneObject(sceneObjectName);
}

DLLEXPORT void __stdcall CreateSceneObject(char* sceneObjectName, char* meshUniqueName)
{
	GCore::GetCore().CreateSceneObject(sceneObjectName, meshUniqueName);
}

bool __stdcall SceneObjectExists(char* tryName)
{
	return GCore::GetCore().SceneObjectExists(tryName);
}

void __stdcall DeleteSceneObject(char* deleteName)
{
	GCore::GetCore().DeleteSceneObject(deleteName);
}

void __stdcall SetProjectName(char* projName)
{
	GCore::GetCore().SetProjectName(projName);
}

void __stdcall GetSceneObjectTransform(char* objName, float* trans)
{
	GCore::GetCore().GetSceneObjectTransform(objName, trans);
}

void __stdcall SetSceneObjectTransform(char* objName, float* trans)
{
	GCore::GetCore().SetSceneObjectTransform(objName, trans);
}

DLLEXPORT const char* __stdcall GetSceneObjectMeshName(char* objName)
{

	return GCore::GetCore().GetSceneObjectMeshName(objName);
}

void __stdcall SetSceneObjectMesh(char* sceneObjectName, char* meshUniqueName)
{
	GCore::GetCore().SetSceneObjectMesh(sceneObjectName,meshUniqueName);
}

DLLEXPORT void __stdcall SetExternData(UINT ini)
{
	GCore::GetCore().SetExternData(ini);
}
